package com.itwang.filter;

import jakarta.servlet.*;
import jakarta.servlet.annotation.WebFilter;

import java.io.IOException;

//@WebFilter("/*")
public class XbcFilter implements Filter {

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("Xbc 拦截到了请求...放行前逻辑");
        System.out.println(servletRequest);
        System.out.println(servletResponse);
        // 放行
        filterChain.doFilter(servletRequest, servletResponse);

        System.out.println("Xbc 拦截到了请求...放行后逻辑");
    }
}
